<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <base href="<%=basePath %>">
    <title>查看界面</title>
    <link rel="stylesheet" href="../res/layui/css/layui.css" media="all">
    <script type="text/javascript" src="../res/js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="../res/js/tools.js"></script>
    <script src="../res/layui/layui.js"></script>
    <script>
        $(function(){
            var id=getQueryString("id");
            var url = "../../AtsSchemeActionNutrition/selectchakan";
            var data = {id:id};
            $.post(url,data,function(obj){
                console.info(obj);
                var athleteName="";
                var auditState="";
                var results="";
                var str="";
                $.each(obj.atsSchemeAthleteList,function(index,item){
                    athleteName+=item.athleteName+",";
                });
                $.each(obj.atsSchemeExpertList,function(index,item){
                    if(item.auditState=="10"){
                        auditState="申请中";
                    }else if(item.auditState=="20"){
                        auditState="中心领导已同意";
                    }else if(item.auditState=="21"){
                        auditState="中心领导不同意";
                    }else if(item.auditState=="30"){
                        auditState="专家已获知待回复";
                    }else if(item.auditState=="40"){
                        auditState="专家已回复";
                    }
                    results=item.results;
                    if(item.results==null||item.results=="null"){
                        str="无";
                    }else{
                        str="下载";
                    }
                });
                var html ="<td>"+obj.coachName+"</td><td>"+obj.schemeName+"</td><td>"+obj.resultTime+"</td><td>"+obj.resultExp+"</td><td>"+obj.resultEffect+"</td>";
                if(obj.resultFile==null||obj.resultFile=="null"){
                    html+="<td>无</td>";
                }else{
                    html+="<td><a href='../.."+obj.resultFile+"'>下载</a></td>";
                }
                html+="<td>"+athleteName+"</td><td>"+auditState+"</td><td><a href='../.."+results+"'>"+str+"</a></td>";
                $("#tr").append(html);
            },"json");
        })
    </script>
</head>
<body>
<div class="layui-form">
    <table class="layui-table" lay-even="" lay-skin="row">
        <thead>
        <tr>
            <th>教练姓名</th>
            <th>方案名称</th>
            <th>反馈时间</th>
            <th>实施情况</th>
            <th>实施效果</th>
            <th>实施附件</th>
            <th>运动员姓名</th>
            <th>审核状态</th>
            <th>专家咨询结果</th>
        </tr>
        </thead>
        <tbody>
        <tr id="tr"></tr>
        </tbody>
    </table>
</div>
</body>
</html>